<template>
  <el-icon @click="loginout"><SwitchButton /></el-icon>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";
import { useUserStore } from '@/stores/userStore';

const userStore = useRouter();

const router = useUserStore();
const loginout = () => {
  router.logout();
  userStore.push('/login');

};
</script>
<style lang="scss" scoped>
</style>
